<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    setTimeout(() => {
        console.log('setTimeout')
        setTimeout(() => {
            console.log('setTimeout setTimeout')
        })
    })

    function callback() {
        console.log('Hello MutationObserver')
        setTimeout(() => console.log('mutation observer serTimeout'))
    }

    const observer = new MutationObserver(callback)
    const textNode = document.createTextNode('')

    observer.observe(textNode, {
        characterData: true
    })

    textNode.data = '1'

    console.log('start')

    for (let i = 0; i < 1000000000; i++) {
        if (i === 999999999) console.log('end')
    }
</script>
</body>
</html>
